import seo from "@/api/seo.js";
export default {
  namespaced: true,
  state() {
    return {
      seoData: {},
    };
  },
  actions: {
    async seoAll(context) {
      const res = await seo.seoAll();
      context.commit("updateSeo", res.seo.rows[0]);
    },
  },
  mutations: {
    // 同步state中用户的信息
    updateSeo(state, data) {
      state.seoData = data;
    },
  },
};
